$(function() {
	/**
	 * 加载歌手
	 */
	adminFindSongBySingerByPage();

});

/**
 * 加载歌手列表
 */
function adminFindSongBySingerByPage() {
	$("table #tab").empty();
	var singerid = $("#singer_id_hidden").val();
	//alert(singerid);
	$.post(path + "/main/addSongBySinger.do",{"singer_id" : singerid},
			function(result) {
		if (result.success) {
			var list = result.data;
			$(list).each(function() {
				var div = '<tr><td>'
						+ this.song_name
						+ '</td><td>'
						+ this.singer_name
						+ '</td><td>'
						+ this.nation
						+ '</td><td>'
						+ this.publishtime
						+ '</td><td><div class="visible-md visible-lg hidden-sm hidden-xs action-buttons"><a class="blue" href="'
						+ path
						+ '/admin/toadminAddmp3.do?singer_id='
						+ this.singer_id
						+ '&singer_name='
						+ this.singer_name
						+ '"><i class="icon-zoom-in bigger-130"></i> </a> <a class="blue"href="'
						+ path
						+ '/admin/toadminAddmv.do?singer_id='
						+ this.singer_id
						+ '&singer_name='
						+ this.singer_name
						+ '"><i class="icon-zoom-in bigger-130"></i></a></div></td></tr>';
				$("table #tab").append(div);
				$("table #tab tr:last").data(
						"song", this);
			});
		} else {
			alert(result.message);
		}
	});
}